#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#  Copyright (c) Huoty - All rights reserved
# 
#      Author: Huoty <sudohuoty@gmail.com>
#  CreateTime: 2016-11-07 16:10:32
# *************************************************************

import getpass
from traitlets import HasTraits, Unicode, default

class Identity(HasTraits):
    username = Unicode()
    
    @default("username")
    def _default_username(self):
        return getpass.getuser()

# Script starts from here

if __name__ == "__main__":
    #iden = Identity(username=1)
    #iden = 1
    iden = Identity()
    print iden.username
